﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Assignment_2
{
    public abstract class GameObject
    {
        protected Matrix objWorld;
        protected Vector3 _position;
        public Vector3 Position
        {
            get { return this._position; }
            set { this._position = value;  }
        }
        //protected Vector3 _up;
        //public Vector3 Up { get { return this._up; } }
        protected Quaternion _rotation = Quaternion.Identity;
        public Quaternion Rotation { get { return this._rotation; } }
        public List<GameObject> children;
        protected GraphicsDevice graphicsDevice;
       
        public GameObject(GraphicsDevice graphicsDevice, Matrix worldref)
        {
            children = new List<GameObject>();
            this.graphicsDevice = graphicsDevice;
            objWorld = worldref;
        }

        public GameObject(GraphicsDevice graphicsDevice)
            : this(graphicsDevice, Matrix.Identity)
        {
        }

        public abstract void Update(GameTime gameTime, Matrix worldMatrix);
        public abstract void Draw(BasicEffect effect, Matrix world);
        public abstract void InitializeVertices();
        public abstract void InitializeIndices();
    }
}
